# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=libgxps
pkgver=0.3.0
pkgrel=1
pkgdesc="XPS Documents library"
url="https://wiki.gnome.org/Projects/libgxps"
arch=(i686 x86_64)
license=(GPL2)
depends=(gtk3 libarchive libjpeg-turbo libtiff lcms2)
makedepends=(gobject-introspection gtk-doc git meson)
_commit=762b3026bb3f29cdc67f7816ef3d34d7d9a243ec  # tags/0.3.0^0
source=("git+https://git.gnome.org/browse/libgxps#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  meson --prefix=/usr --buildtype=release ../$pkgname \
    -Denable-man=true -Denable-gtk-doc=true
  ninja
}

check() {
  cd build
  mesontest
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}

# vim:set ts=2 sw=2 et:
